2 // ESGaimRequestAbstractWindowController.m
5 // Created by Evan Schoenberg on 9/22/05.
8 #import "ESGaimRequestAbstractWindowController.h"
9 #import "adiumGaimRequest.h"
11 @implementation ESGaimRequestAbstractWindowController
13 - (id)initWithWindowNibName:(NSString *)windowNibName
15 if ((self = [super initWithWindowNibName:windowNibName])) {
23 * @brief This is where subclasses should generally perform actions they would normally do in windowWillClose:
25 * ESGaimRequestAbstractWindowController calls this method only when windowWillClose: is triggered by user action
26 * as opposed to libgaim closing the window.
28 - (void)doWindowWillClose {};
30 - (void)windowWillClose:(id)sender
32 [super windowWillClose:sender];
34 if (!windowIsClosing) {
35 windowIsClosing = YES;
36 [self doWindowWillClose];
38 //Inform libgaim that the request window closed
39 [ESGaimRequestAdapter requestCloseWithHandle:self];
44 * @brief libgaim has been made aware we closed or has informed us we should close
46 * Close our requestController's window if it's open; then release (we returned without autoreleasing initially).
48 - (void)gaimRequestClose
50 if (!windowIsClosing) {
51 windowIsClosing = YES;
52 [self closeWindow:nil];